cmake_minimum_required(VERSION 2.6)
PROJECT(NETZEN)

SET (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
MESSAGE(STATUS "Creating binary in ${EXECUTABLE_OUTPUT_PATH}")

SET(QT_USE_QTOPENGL TRUE )
FIND_PACKAGE(Qt4 REQUIRED)
INCLUDE( ${QT_USE_FILE} )
if(QT4_FOUND)
	MESSAGE(STATUS "Using QT. Include : ${QT_INCLUDE_DIR}")
	MESSAGE(STATUS "		 Libs: ${QT_LIBRARIES}")
else()
	MESSAGE(STATUS "Did not find QT")
endif()

FIND_PACKAGE(OpenGL REQUIRED)

INCLUDE(./config/FindPNG.cmake)
FIND_PACKAGE(PNG)
if(PNG_FOUND)
	MESSAGE(STATUS "Using PNG. Include : ${PNG_INCLUDE_DIR}")
	MESSAGE(STATUS "		 Libs: ${PNG_LIBRARY}")
endif()
INCLUDE(./config/FindGLEW.cmake)
#FIND_PACKAGE(GLEW)
if(GLEW_FOUND)
	MESSAGE(STATUS "Using GLEW. Include : ${GLEW_INCLUDE_PATH}")
	MESSAGE(STATUS "		 Libs: ${GLEW_LIBRARY}")
endif()

set(Boost_USE_STATIC_LIBS   ON)
set(Boost_USE_MULTITHREADED ON)
INCLUDE(./config/FindBoost.cmake)
find_package(Boost)
if(Boost_FOUND)
	MESSAGE(STATUS "Using Boost. Include : ${Boost_INCLUDE_DIRS}")
	MESSAGE(STATUS "		 Libs: ${Boost_LIBRARY_DIRS}")
      	include_directories(${Boost_INCLUDE_DIRS})
      	#add_executable(foo foo.cc)
	target_link_libraries(foo ${Boost_LIBRARIES})
else()
	MESSAGE(STATUS "Did not find Boost")
endif()

find_package(LAPACK)

set(CMAKE_CXX_FLAGS "-O3")

add_subdirectory(src)
